package com.hmdp.controller;

import com.hmdp.dto.Result;
import com.hmdp.rabbitmq.MQSender;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/mq/test")
public class MQTestController {

    @Autowired
    private MQSender mqSender;

    @GetMapping("/send")
    public Result mqSend() {
        mqSender.send("Hello");
        return Result.ok();
    }
}
